import { http } from "@/utils/http";

import type { Result } from "./typeConfig";

//工具借还日志 + 工具借还统计
export const toolLendReturnLogStats = params =>
  http.request<Result>("get", "/screen/stat/toolLendReturnLogStats", {
    params
  });

// 工具在柜情况 + 智能设备在线情况;
export const toolFacilityUseStat = params =>
  http.request<Result>("get", "/screen/stat/toolFacilityUseStat", {
    params
  });

// 按日期统计工具借还频率 + 按小时统计工具借还频率;
export const toolLendReturnFrequencyStats = params =>
  http.request<Result>("get", "/screen/stat/toolLendReturnFrequencyStats", {
    params
  });

// 用户使用排行榜 + 用户未归还排行榜 + 工具借出排行榜
export const theChartsStat = params =>
  http.request<Result>("get", "/screen/stat/theChartsStat", {
    params
  });

// 设备总览 + 设施(货架)使用频率
export const facilityStat = params =>
  http.request<Result>("get", "/screen/stat/facilityStat", {
    params
  });

// 定检预警详情 + 门禁报警详情 + 工具报修详情 + 紧缺工具在位情况
export const toolStat = params =>
  http.request<Result>("get", "/screen/stat/toolStat", {
    params
  });
// 获取工具室管理终端配置详细信息
export const warehouseConfig = params =>
  http.request<Result>(
    "get",
    `/system/warehouseConfig/${params.warehouseId}`,
    {}
  );
